# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=enigma
pkgver=1.30
pkgrel=4
pkgdesc="Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga"
url="http://www.nongnu.org/enigma/"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	curl-dev
	enet-dev
	gettext-dev
	imagemagick
	libpng-dev
	sdl2-dev
	sdl2_image-dev
	sdl2_mixer-dev
	sdl2_ttf-dev
	xerces-c-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/Enigma-Game/Enigma/releases/download/$pkgver/Enigma-$pkgver-src.tar.gz
	format-security.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-system-enet
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
57c6d642538b7bce6a748e1e1bce641dcc1dcd627a4e2c4dfe5d1271bf9df624075914c04fc6cddc1b1118585e4f111d79c8c8a54a1a6b93a8bedfb1aa9f2ef6  Enigma-1.30-src.tar.gz
4631ba0a3057eaf3eaed334a5b7764c401f5b4505ce585270fd2b9a6e8eff23e69b8f224fbf2bf0f601c7f60e51b063dc4d3fc1abc9ed844ff9830cded1e4226  format-security.patch
"
